package com.xinzhi.service.impl;

import com.xinzhi.config.RabbitMqConfig;
import com.xinzhi.service.ISendService;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class SendServiceImpl implements ISendService {
    @Resource
    private RabbitTemplate rabbitTemplate;
    @Override
    public void send(String msg) {
        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME,"xinzhi.666",msg);
    }
}
